Add weak consistency option to DescribeNamespaceRequest#775
Merged
Conversation
3 tasks
Sushisource
approved these changes
Apr 28, 2026
Member
Sushisource
left a comment
There was a problem hiding this comment.
The comment should probably reference that the SDK should use this when fetching namespace capabilities on startup since I believe that's the main reason we're adding this flag
yycptt
approved these changes
Apr 28, 2026
d2aaf78 to
c74037a
Compare
simvlad
added a commit
to temporalio/temporal
that referenced
this pull request
Apr 30, 2026
## What changed? Added server-side handling for the new `weak_consistency` flag on `DescribeNamespaceRequest` (proto change in temporalio/api#775). When the flag is set, `DescribeNamespace` is served from the in-memory namespace registry, bypassing the metadata store. When unset, behavior is unchanged. ## Why? `DescribeNamespace` currently always reads through to the persistence store. The new field lets clients opt into eventually-consistent reads where read-after-write semantics aren't required, while preserving the existing strong-consistency contract for operator/admin callers (default behavior unchanged). ## How did you test it? - [X] built - [X] added new unit test(s) - [X] added new functional test(s) ## Potential risks - Eventual consistency on when weak_consistency is set. A namespace created within the registry's refresh interval may return `NamespaceNotFound` even though it exists in persistence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Added weak_consistency boolean field to
DescribeNamespaceRequest. When set totrue, the server may serve the response from an eventually-consistent source (e.g. the in-memory namespace registry) instead of reading through to persistence.Why?
DescribeNamespacecurrently always reads through to the persistence store. The new field lets clients opt into eventually-consistent reads where read-after-write semantics aren't required, while preserving the existing strong-consistency contract for operator/admin callers (default behavior unchanged).Breaking changes
None. Additive field with default
false, preserving current behavior for clients that don't set it.Server PR
temporalio/temporal#10103